Add support for mesh shapes parametrization#502
Draft
flferretti wants to merge 14 commits intomainfrom
Draft
Conversation
f3cd74b to
dfeeb8d
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds hardware-parametrization support for mesh-shaped links, including loading mesh geometry for inertia recomputation, exporting scaled meshes back to URDF, and adding regression/validation tests with new mesh-based test assets.
Changes:
- Extend HW link metadata to support a new
Meshshape type and store per-link mesh data (vertices/faces/offset/uri). - Update model parsing/export and HW scaling logic to handle mesh scaling and preserve URDF visual/joint origins on export.
- Add new tests and URDF/STL assets covering mixed primitive+mesh models and mesh export regressions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_api_model_hw_parametrization.py | Adds regression + mixed-shape tests for mesh metadata, scaling, and URDF export/import behavior. |
| tests/assets/test_cube.urdf | Adds a simple mesh-only URDF fixture for tests. |
| tests/assets/mixed_shapes_robot.urdf | Adds a mixed primitive+mesh URDF fixture for end-to-end parametrization/scaling tests. |
| tests/assets/cube.stl | Adds a small cube STL mesh fixture used by the new URDFs/tests. |
| src/jaxsim/parsers/rod/utils.py | Adds a helper to load/scale/center meshes and provide watertightness + volume for parametrization. |
| src/jaxsim/api/model.py | Integrates mesh support into HW metadata computation, URDF export scaling for meshes, and rewrites scaling application logic. |
| src/jaxsim/api/kin_dyn_parameters.py | Introduces Mesh enum value, stores mesh metadata on HwLinkMetadata, and adds mesh inertia computation path. |
| pyproject.toml | Enables a Pixi preview feature flag (pixi-build). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
59f7136 to
4d971c7
Compare
4d971c7 to
ff4ae30
Compare
ff4ae30 to
0e059d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for mesh-shaped links in the model for hardware parametrization.
📚 Documentation preview 📚: https://jaxsim--502.org.readthedocs.build//502/